@import "_reset.scss";
@import "head.scss";
@import "foot.scss";

%w {
  width: 1220px;
  margin: 0 auto;
}
body {
  background: #fff;
}
img {
  vertical-align: middle;
}

// 主体
.wrapAll {
  @extend %w;
  margin-top: 50px;
  margin-bottom: 50px;

  .left {
    width: 400px;
    float: left;
    margin-right: 20px;

    .showGoods {
      width: 400px;
      height: 400px;
      position: relative;
    }

    .shadow {
      position: absolute;
      top: 0;
      left: 0;
      width: 200px;
      height: 200px;
      background: rgba(0, 0, 0, 0.5);
      cursor: all-scroll;
      pointer-events: none;
      display: none;
    }

    img {
      width: 100%;
      height: 100%;
    }

    .showList {
      display: flex;
      width: 100%;
      margin-top: 10px;

      li {
        flex: 1;
        width: 120px;
        height: 120px;
        box-sizing: border-box;
        & + li {
          margin-left: 10px;
        }

        & > img:hover {
          border: 1px solid red;
        }
      }
    }
  }

  .right {
    position: relative;
    float: right;
    width: -webkit-calc(100% - 400px - 20px);
    min-height: 500px;
    font-size: 14px;
    color: #333;

    .scaleGoods {
      display: none;
      position: absolute;
      width: 500px;
      height: 500px;
      overflow: hidden;
      background-color: rgba(125, 255, 255, 0.5);

      img {
        position: absolute;
        top: 0;
        left: 0;
        width: 1000px;
        height: 1000px;
      }
    }

    .title {
      width: 780px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 22px;
      font-weight: 700;
      padding: 20px 10px;
      color: #000;
    }

    .detail {
      height: 150px;
      background: #f4f4f4;
      padding-left: 10px;
      line-height: 27px;
      font-size: 16px;

      span {
        &:nth-of-type(2) {
          font-size: 18px;
          color: #e60012;
        }
        &:nth-of-type(3) {
          font-size: 18px;
          color: #e60012;
        }
        &:nth-of-type(4) {
          text-decoration: line-through;
          color: #666;
        }
      }
      .activity {
        i {
          font-size: 12px;
          color: #999;

          &:nth-child(2) {
            display: inline-block;
            width: 65px;
            height: 25px;
            line-height: 25px;
            text-align: center;
            border: 1px solid #e60012;
            color: #e60012;
            margin-right: 15px;
            margin-left: 5px;
          }
          &:nth-child(3) {
            margin-right: 45px;
          }
          &:nth-child(4) {
            margin-right: 45px;
          }
        }
      }

      .color {
        display: flex;
        margin-top: 20px;
        p {
          margin-top: 30px;
        }

        li {
          float: left;
          width: 60px;
          height: 60px;
          border: 1px solid #ccc;
          margin: 20px;

          img {
            width: 60px;
            height: 60px;
          }
        }
      }

      .size {
        display: flex;
        text-align: center;

        li {
          float: left;
          width: 42px;
          height: 42px;
          line-height: 42px;
          border: 1px solid #ccc;
          margin: 0 0 20px 20px;
        }
      }

      .num {
        display: flex;
        margin: 5px 0;

        p {
          margin-right: 20px;
        }
        .count {
          display: flex;
          text-align: center;
          width: 103px;
          height: 26px;
          border: 1px solid #c7c6c6;
          float: left;

          .reduce {
            width: 26px;
            height: 26px;
            background-color: #f5f5f5;
            float: left;
            text-align: center;
            line-height: 26px;
          }
          .count-input {
            float: left;
            width: 51px;
            height: 26px;
            border: none;
            outline: none;
            text-align: center;
          }
          .add {
            width: 26px;
            height: 26px;
            background-color: #f5f5f5;
            text-align: center;
            line-height: 26px;
            float: left;
          }
        }
      }

      .buyGoods {
        color: #fff;
        font-size: 20px;
        line-height: 50px;
        cursor: pointer;
        margin-top: 44px;

        .addToShoppingCar {
          height: 50px;
          width: 185px;
          text-align: center;
          background: #f20012;
          display: inline-block;
          margin-right: 30px;
        }
        .heart {
          width: 185px;
          height: 50px;
          text-align: center;
          background: #585858;
          display: inline-block;
        }
      }
    }
  }
}

.goodsDetail {
  @extend %w;
}
